/*
*用途：附件表（banner表）
*作者：hwq
*创建日期：2019-01-14 16:50
*/

const Sequelize = require('sequelize')
const sequelize = require('./sequelize')

const Attach = sequelize.define('attach', {
  id: { type: Sequelize.INTEGER, allowNull: false, autoIncrement: true, primaryKey: true },
  filepath: { type: Sequelize.STRING, allowNull: false },
  linkurl: { type: Sequelize.STRING },
  title: { type: Sequelize.STRING },
  type: { type: Sequelize.INTEGER, allowNull: false },
  state: { type: Sequelize.BOOLEAN, defaultValue: true },
  fid: { type: Sequelize.INTEGER, allowNull: false }
})

module.exports = Attach